package top.spring.study.filter;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * https://blog.csdn.net/qq_35207086/article/details/120091221
 */
public class LimitRateRequestFilter implements Filter {


    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {

        HttpServletRequest httpServletRequest=(HttpServletRequest)request;
        System.out.println("自定义过滤器filter1触发,拦截url:"+httpServletRequest.getRequestURI());
        chain.doFilter(request,response);

    }
}
